package com.chinasofti.java8.demo06;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ClassLoaderDemo02 {
    public static void main(String[] args) throws IOException {
        //获取系统类加载器
        ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();

        //利用加载器指定一个文件
        InputStream is =
                systemClassLoader.getResourceAsStream("prop.properties");
        Properties prop =new Properties();
        prop.load(is);
        System.out.println(prop);
        is.close();

    }
}
